﻿using System.Collections.Generic;

namespace HiTeachers.Interfaces
{
    public interface IGenericDao<T, TIdT> : IDao
    {
        T GetById(TIdT id, bool shouldLock);
        IList<T> GetAll();
        IList<T> GetByExample(T exampleInstance, params string[] propertiesToExclude);
        T GetUniqueByExample(T exampleInstance, params string[] propertiesToExclude);
        T Save(T entity);
        T SaveOrUpdate(T entity);
        void Delete(T entity);
        void Refresh(T entity);
        /*void CommitChanges();*/
    }
}
